package cn.buk.qms.service;

import cn.buk.common.JsonResult;
import cn.buk.tms.entity.order.flight.FlightCatchOrder;
import cn.buk.tms.entity.misc.OperationLog;
import cn.buk.tms.sc.SearchFlightOrderCriteria;
import cn.buk.tms.flight.request.FlightOrderRequestDto;

import java.util.List;

/**
 * Created by william on 2015-3-19.
 */
public interface FlightCatchOrderService {

    /**
     * 创建追位订单
     * @param enterpriseId 用户所属企业enterpriseId
     * @param operator 当前用户名
     * @param remoteAddr
     * @param dto 保存的对象
     * @return
     */
    JsonResult createOrder(int enterpriseId, String operator, String remoteAddr, FlightOrderRequestDto dto);

    List<FlightCatchOrder> searchFlightOrders(int enterpriseId, int userId, String username, SearchFlightOrderCriteria sc);

    List<OperationLog> searchFlightOrderHistory(int enterpriseId, int orderId);

    FlightCatchOrder getFlightOrderDetail(int enterpriseId, int id);



    JsonResult updateFlightOrderPassenger(int enterpriseId, int orderId, int id, String name, String idNo, String ffpNo, String mobile);

    JsonResult updateFlightOrderRemark(int enterpriseId, String username, int orderId, String remark);

    JsonResult updateFlightOrderPnr(int enterpriseId, String username, int orderId, String pnrNo);

    /**
     * 取消订单
     * @param enterpriseId 当前用户的enterpriseId
     * @param username 当前用户的username
     * @param orderId 订单id
     * @param reasonCode 取消理由的代码
     * @param reasonDesc 取消理由
     */
    JsonResult cancelFlightOrder(int enterpriseId, String username, int orderId, int reasonCode, String reasonDesc);

    JsonResult monitorFlightCatchOrder(int enterpriseId, String username, int orderId);

    JsonResult deleteCatchOrder(int enterpriseId, int orderId);
}
